Introduce configurable timeout to Create NAS backup#12964
Introduce configurable timeout to Create NAS backup#12964abh1sar wants to merge 4 commits intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12964 +/- ##
============================================
- Coverage 17.60% 17.60% -0.01%
+ Complexity 15676 15675 -1
============================================
Files 5918 5918
Lines 531667 531682 +15
Branches 65001 65007 +6
============================================
- Hits 93617 93615 -2
- Misses 427491 427506 +15
- Partials 10559 10561 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
| @@ -211,6 +212,7 @@ public Pair<Boolean, Backup> takeBackup(final VirtualMachine vm, Boolean quiesce | |||
| command.setBackupRepoAddress(backupRepository.getAddress()); | |||
| command.setMountOptions(backupRepository.getMountOptions()); | |||
| command.setQuiesce(quiesceVM); | |||
| command.setTimeout(NASBackupCreateBackupTimeout.value()); | |||
There was a problem hiding this comment.
@abh1sar can this be addressed with the value 'TakeBackupCommand=14400' in commands.timeout global config? if so, we can document it and skip this new timeout config?
There was a problem hiding this comment.
Thanks @sureshanaparti . I'll test with commands.timeout and update
There was a problem hiding this comment.
@sureshanaparti made the change to use commands.timeout. default value is taken from libvirtComputingResource.getCmdsTimeout() if commands.timeout is not set, as before.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17365 |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a configurable timeout for KVM NAS backup/restore operations by deriving a per-command timeout (with fallback to the agent default), and updates unit tests accordingly.
Changes:
- Compute an effective timeout from
command.getWait()(fallback tocmds.timeout) forTakeBackupCommand. - Apply the same effective timeout strategy to restore flows and propagate it to
rsyncandqemu-imgexecution. - Adjust
LibvirtRestoreBackupCommandWrapperTeststatic script stubbing to better simulatersyncoutcomes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java | Uses per-command timeout (from wait) when executing piped backup commands. |
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapper.java | Applies per-command timeout to rsync and qemu-img restore operations. |
| plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java | Updates script mocks to model different exit codes (e.g., rsync failure) and simplifies one test’s stubbing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java
Show resolved
Hide resolved
...src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java
Show resolved
Hide resolved
.../main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapper.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17382 |
Description
Create backup used to take the default
cmds.timeout(7200s) in agent.properties as the timeout.This might not be enough for large images and slow networks.
Adding a configurable timeout for create backup.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?